﻿using System.Data.Common;
using System.Linq;
using Dapper;
using TimerTask.Model.Entity;

namespace TimerTask.Dal
{
    public class SysUserDal : BaseDal
    {
        /// <summary>
        /// 查找用户
        /// author:肖阳
        /// 2016-10-22 08:48:35
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public SysUser FindBy(string userName)
        {
            string sql = "SELECT * FROM  sysuser WHERE UserName=?userName;";
            return DbConnection.Query<SysUser>(sql, new { userName }).SingleOrDefault();
        }
    }
}
